<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: aimath_basic.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('aimath__basic_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">aimath_basic.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="aimath__basic_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#ifndef AIMATH_BASIC</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#define AIMATH_BASIC</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aifes__math_8h.html">core/aifes_math.h</a>&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="aimath__basic_8h.html#ab10c8d06990943806f0be8fcc6af03fc">   45</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__basic_8h.html#ab10c8d06990943806f0be8fcc6af03fc">print_aitensor</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *tensor);</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="aimath__basic_8h.html#aaa9ca757028820849ef3dde13cc46565">   61</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__basic_8h.html#aaa9ca757028820849ef3dde13cc46565">print_aiscalar</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *scalar, <span class="keyword">const</span> <a class="code" href="structaimath__dtype.html">aimath_dtype_t</a> *dtype);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160; </div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="aimath__basic_8h.html#a2493f76ff7bca07ccfce567c2e678ece">   73</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aimath__basic_8h.html#a2493f76ff7bca07ccfce567c2e678ece">aimath_transpose_vector</a>(<a class="code" href="structaitensor.html">aitensor_t</a> *vector);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="aimath__basic_8h.html#af298fd08e5d0e8182aac03c34dcbfbc0">   80</a></span>&#160;uint32_t <a class="code" href="aimath__basic_8h.html#af298fd08e5d0e8182aac03c34dcbfbc0">aimath_tensor_elements</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *tensor);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="aimath__basic_8h.html#adb2e8e78c254bba409ca94b989fb0aed">   87</a></span>&#160;uint32_t <a class="code" href="aimath__basic_8h.html#adb2e8e78c254bba409ca94b989fb0aed">aimath_sizeof_dtype</a>(<span class="keyword">const</span> <a class="code" href="structaimath__dtype.html">aimath_dtype_t</a> *dtype);</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160; </div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="aimath__basic_8h.html#aed334e3dae9f383fde9c43e99872c745">   98</a></span>&#160;uint32_t <a class="code" href="aimath__basic_8h.html#aed334e3dae9f383fde9c43e99872c745">aimath_sizeof_tensor_data</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *tensor);</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="aimath__basic_8h.html#afe922f577551340a7d559c3a722baa69">  105</a></span>&#160;uint32_t <a class="code" href="aimath__basic_8h.html#afe922f577551340a7d559c3a722baa69">aimath_sizeof_tensor_params</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *tensor);</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="aimath__basic_8h.html#a47674c7536683118f1fa711c3c5c883e">  116</a></span>&#160;uint32_t <a class="code" href="aimath__basic_8h.html#a47674c7536683118f1fa711c3c5c883e">aimath_sizeof_tensor</a>(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *tensor);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="comment">//void aimath_create_tensor_2d(uint16_t shape_0, uint16_t shape_1, aimath_dtype_t dtype, void *memory_ptr);</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// AIMATH_BASIC</span></div>
<div class="ttc" id="aaifes__math_8h_html"><div class="ttname"><a href="aifes__math_8h.html">aifes_math.h</a></div><div class="ttdoc">AIfES 2 math interface.</div></div>
<div class="ttc" id="aaimath__basic_8h_html_a2493f76ff7bca07ccfce567c2e678ece"><div class="ttname"><a href="aimath__basic_8h.html#a2493f76ff7bca07ccfce567c2e678ece">aimath_transpose_vector</a></div><div class="ttdeci">void aimath_transpose_vector(aitensor_t *vector)</div><div class="ttdoc">Transposes a vector.</div></div>
<div class="ttc" id="aaimath__basic_8h_html_a47674c7536683118f1fa711c3c5c883e"><div class="ttname"><a href="aimath__basic_8h.html#a47674c7536683118f1fa711c3c5c883e">aimath_sizeof_tensor</a></div><div class="ttdeci">uint32_t aimath_sizeof_tensor(const aitensor_t *tensor)</div><div class="ttdoc">Returns size of tensor in bytes.</div></div>
<div class="ttc" id="aaimath__basic_8h_html_aaa9ca757028820849ef3dde13cc46565"><div class="ttname"><a href="aimath__basic_8h.html#aaa9ca757028820849ef3dde13cc46565">print_aiscalar</a></div><div class="ttdeci">void print_aiscalar(const void *scalar, const aimath_dtype_t *dtype)</div><div class="ttdoc">Printing a scalar to console.</div></div>
<div class="ttc" id="aaimath__basic_8h_html_ab10c8d06990943806f0be8fcc6af03fc"><div class="ttname"><a href="aimath__basic_8h.html#ab10c8d06990943806f0be8fcc6af03fc">print_aitensor</a></div><div class="ttdeci">void print_aitensor(const aitensor_t *tensor)</div><div class="ttdoc">Printing a tensor to console.</div></div>
<div class="ttc" id="aaimath__basic_8h_html_adb2e8e78c254bba409ca94b989fb0aed"><div class="ttname"><a href="aimath__basic_8h.html#adb2e8e78c254bba409ca94b989fb0aed">aimath_sizeof_dtype</a></div><div class="ttdeci">uint32_t aimath_sizeof_dtype(const aimath_dtype_t *dtype)</div><div class="ttdoc">Returns the size of one value in the given data type in bytes.</div></div>
<div class="ttc" id="aaimath__basic_8h_html_aed334e3dae9f383fde9c43e99872c745"><div class="ttname"><a href="aimath__basic_8h.html#aed334e3dae9f383fde9c43e99872c745">aimath_sizeof_tensor_data</a></div><div class="ttdeci">uint32_t aimath_sizeof_tensor_data(const aitensor_t *tensor)</div><div class="ttdoc">Returns size of the data array of the tensor in bytes.</div></div>
<div class="ttc" id="aaimath__basic_8h_html_af298fd08e5d0e8182aac03c34dcbfbc0"><div class="ttname"><a href="aimath__basic_8h.html#af298fd08e5d0e8182aac03c34dcbfbc0">aimath_tensor_elements</a></div><div class="ttdeci">uint32_t aimath_tensor_elements(const aitensor_t *tensor)</div><div class="ttdoc">Calculates the number of elements in a tensor.</div></div>
<div class="ttc" id="aaimath__basic_8h_html_afe922f577551340a7d559c3a722baa69"><div class="ttname"><a href="aimath__basic_8h.html#afe922f577551340a7d559c3a722baa69">aimath_sizeof_tensor_params</a></div><div class="ttdeci">uint32_t aimath_sizeof_tensor_params(const aitensor_t *tensor)</div><div class="ttdoc">Returns size of the aitensor.tensor_params for the data type of the tensor.</div></div>
<div class="ttc" id="astructaimath__dtype_html"><div class="ttname"><a href="structaimath__dtype.html">aimath_dtype</a></div><div class="ttdoc">Indicator for the used datatype.</div><div class="ttdef"><b>Definition:</b> aifes_math.h:44</div></div>
<div class="ttc" id="astructaitensor_html"><div class="ttname"><a href="structaitensor.html">aitensor</a></div><div class="ttdoc">A tensor in AIfES.</div><div class="ttdef"><b>Definition:</b> aifes_math.h:89</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1e5d3661ed79af157d57e64a38265d09.html">basic</a></li><li class="navelem"><a class="el" href="dir_90008ee2b0f86999412b56217da88d54.html">base</a></li><li class="navelem"><a class="el" href="dir_4fb15a30b37b64fdad6823e3082f73a4.html">aimath</a></li><li class="navelem"><a class="el" href="aimath__basic_8h.html">aimath_basic.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
